<!DOCTYPE html>
<html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title>修改密码--layui后台管理模板 2.0</title>
    <meta name="renderer" content="webkit"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="format-detection" content="telephone=no"/>
    <link rel="stylesheet" href="/resource/common/layui/css/layui.css" media="all"/>
    <link href="/resource/js/bstable/css/bootstrap.min.css" rel="stylesheet" type="text/css">
    <link href="/resource/js/bstable/css/bootstrap-table.css" rel="stylesheet" type="text/css">
    <link href="/resource/css/table.css" rel="stylesheet" type="text/css">
</head>
<style>
    #house-user-orderDetails + div td .layui-table-cell {
        height: 78px;
        line-height: 79px;
    }
</style>
<body style="background-color: #ecf0f5;font-family: 楷体;color: #475059;overflow: auto">
<div class="notice_main ">
    <h4>订单详情</h4>
    <hr class="layui-bg-blue">
    <table id="house-user-orderDetails" lay-filter="house-user-orderDetails"></table>
</div>
<script type="text/html" id="goodsTpl">
    <div>
        <img src="{{d.avatar}}" style="height: 100px">
        <div style="display: inline-block; text-align: left; vertical-align: top;">
            <p>{{d.name}}&nbsp;&nbsp;&nbsp;{{d.color}}</p>
        </div>
    </div>
</script>
<script type="text/html" id="priceTpl">
    <p><span class="price">￥{{d.price}}</span></p>
</script>
<script type="text/html" id="numTpl">
    <div class="">
        <p><span>{{d.number}}</span>
        </p>
    </div>
</script>
<script type="text/html" id="totalTpl">
    <span class="total" style="color: #cd2d15;">￥{{(d.price*d.number).toFixed(2)}}</span>
</script>
<script type="text/javascript" src="/resource/common/layui/layui.js"></script>
<script th:inline="javascript">
    layui.use(['table', 'layer', 'laydate', 'form'], function () {
        var table = layui.table,
            $ = layui.$,
            layer = layui.layer,
            form = layui.form
        var orderId = [[${orderId}]]
        table.render({
            elem: '#house-user-orderDetails'
            , url: '/front/orderDetailsTable.do' //数据接口
            , method: 'get'
            , page: true //开启分页
            , id: 'tableId'
            , where: {'orderId': orderId}
            , limits: [10, 15, 30]
            , limit: 15
            , cols: [
                [ //表头
                    {title: '商品', align: 'center', width: 350, templet: '#goodsTpl'}
                    , {title: '单价', align: 'center', templet: '#priceTpl'}
                    , {title: '数量', align: 'center', templet: '#numTpl'}
                    , {title: '小计', align: 'center', templet: '#totalTpl'}
                ]
            ]
        });
    });
</script>

</body>
</html>